package com.atguigu.spzx.manager.controller;

import com.atguigu.spzx.manager.service.OrderInfoService;
import com.atguigu.spzx.model.vo.common.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@Tag(name = "订单管理模块")
@RequestMapping("/admin/order/orderInfo")
public class OrderInfoController {
    @Resource
    OrderInfoService orderInfoService;
    @Operation(summary = "查询订单区间统计数据")
    @GetMapping("listOrderStatistics")
    public Result<Map<String, List<Object>>> listOrderStatistics(String begin,
                                                                 String end){
        Map<String, List<Object>> map = orderInfoService.listOrderStatistics(begin,end);
        return Result.ok(map);
    }

}
